package com.soft.javase.day01.practice;

/**
 * @author yzg
 * @desc TODO
 * @date 2025/4/15
 */
public class GradeCalculate {
    private float javaGrade;
    private float cSharpGrade;
    private float dataBaseGrade;


    public GradeCalculate() {
    }

    public GradeCalculate(float javaGrade, float cSharpGrade, float dataBaseGrade) {
        this.javaGrade = javaGrade;
        this.cSharpGrade = cSharpGrade;
        this.dataBaseGrade = dataBaseGrade;
    }

    public float getJavaGrade() {
        return javaGrade;
    }

    public void setJavaGrade(float javaGrade) {
        this.javaGrade = javaGrade;
    }

    public float getcSharpGrade() {
        return cSharpGrade;
    }

    public void setcSharpGrade(float cSharpGrade) {
        this.cSharpGrade = cSharpGrade;
    }

    public float getDataBaseGrade() {
        return dataBaseGrade;
    }

    public void setDataBaseGrade(float dataBaseGrade) {
        this.dataBaseGrade = dataBaseGrade;
    }

    public void average(){
        System.out.println("三个科目平均值为："+(javaGrade + cSharpGrade + dataBaseGrade)/3);
    }

    public void sum(){
        System.out.println("三个科目总成绩为："+(javaGrade + cSharpGrade + dataBaseGrade));
    }
}
